<template>
  <div>
    <el-drawer
      title="审核"
      :visible.sync="drawer"
      direction="rtl"
      :before-close="close"
      size="600px"
    >
      <div class="bock" v-loading="loading">
        <div class="TableFormMax">
          <el-form
            ref="Form"
            :model="form_data"
            size="mini"
            label-position="right"
            label-width="130px"
            :rules="rules"
          >
            <el-col :span="24">
              <el-form-item label="账户名" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="人员类型" prop="PROCESS_NAME">
                <el-select
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                >
                  <el-option label="是" value="7"></el-option>
                  <el-option label="否" value="8"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="姓名" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="身份证号" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                ></el-input>
              </el-form-item>
            </el-col>

            <el-col :span="24">
              <el-form-item label="手机号码" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="所属单位" prop="PROCESS_NAME">
                <el-select
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                >
                  <el-option label="是" value="7"></el-option>
                  <el-option label="否" value="8"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="居住地址" prop="PROCESS_NAME">
                <el-select
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                >
                  <el-option label="是" value="7"></el-option>
                  <el-option label="否" value="8"></el-option>
                </el-select>
              </el-form-item>
            </el-col>

            <el-col :span="24">
              <el-form-item label="详细地址" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                  type="textarea"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="身份证" prop="PROCESS_NAME">
                身份证图片
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="单位名称" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="统一审核信用代码" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="单位地址" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  placeholder="暂无"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="详细地址" prop="PROCESS_NAME">
                <el-input
                  v-model="form_data.PROCESS_NAME"
                  readonly
                  type="textarea"
                  placeholder="暂无"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="营业执照" prop="PROCESS_NAME">
                营业执照图片
              </el-form-item>
            </el-col>
          </el-form>
        </div>
      </div>
      <div class="drawerBtn">
        <el-button
          size="mini"
          type="danger"
          icon="el-icon-close"
          @click="notPass"
          >审核不通过</el-button
        >
        <el-button
          size="mini"
          type="primary"
          icon="el-icon-check"
          @click="submit"
          >审核通过</el-button
        >
      </div>
    </el-drawer>
    <el-dialog
      :title="title"
      :visible.sync="confirm"
      width="30%"
      :before-close="handleClose"
    >
      <div style="height: 140px">
        <el-input
          v-model="form_data.PROCESS_NAME"
          type="textarea"
          placeholder="请输入审核意见"
        ></el-input>
      </div>

      <template #footer>
        <el-button size="mini" @click="confirm = false">取 消</el-button>
        <el-button size="mini" type="primary" @click="confirm = false"
          >确 定</el-button
        >
      </template>
    </el-dialog>
  </div>
</template>

<script>
// import {addEvaluate} from '@/api/comprehensiveQuality/index.js';
import { VueEditor } from "vue2-editor";
export default {
  components: { VueEditor },
  props: {
    data: {
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
      loading: 0,
      value: [],
      fileList: [],
      title: "",
      show: false,
      confirm: false,
      drawer: false,
      options: [
        {
          value: "zhinan",
          label: "指南",
          children: [
            {
              value: "shejiyuanze",
              label: "设计原则",
            },
            {
              value: "yizhi",
              label: "一致",
            },
            {
              value: "fankui",
              label: "反馈",
            },
            {
              value: "xiaolv",
              label: "效率",
            },
            {
              value: "kekong",
              label: "可控",
            },
          ],
        },
      ],
      form_data: {
        EVALUATE: "",
        PROCESS_NAME: "",
        radio: "",
        content: "",
      },
      rules: {
        EVALUATE: [
          { required: true, message: "请输入评价", trigger: "blur" },
          {
            min: 1,
            max: 100,
            message: "长度在 1 到 100 个字符",
            trigger: "blur",
          },
        ],
      },
    };
  },
  mounted() {},
  methods: {
    isShow() {
      this.drawer = true;
    },
    handleChange(value) {
      console.log(value);
    },
    handleRemove(file, fileList) {
      console.log(file, fileList);
    },
    handlePreview(file) {
      console.log(file);
    },

    beforeRemove(file, fileList) {
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    submit() {
      this.title = "审核通过确认";
      this.confirm = true;
      return;
      this.$refs["Form"].validate((valid) => {
        if (valid) {
          //   let data = {
          //     MOR_BEHA_EVALUATE: this.form_data.EVALUATE,
          //     EVALUATION_SCORE_ID: this.data.EVALUATION_SCORE_ID,
          //   };
          //   this.loading = true;
          //   addEvaluate(data)
          //     .then((res) => {
          //       this.$message.success("评价成功");
          //       this.loading = false;
          //       this.$emit("submit");
          //       this.show = false;
          //     })
          //     .catch(() => {});
        } else {
          return false;
        }
      });
    },
    notPass() {
      this.title = "审核不通过确认";
      this.confirm = true;
    },
    close() {
      this.drawer = false;
    },
    handleClose() {
      this.confirm = false;
    },
  },
};
</script>

<style scoped>
.ty-form-dialog {
  overflow-y: auto;
  position: relative;
  z-index: 150;
  padding-bottom: 30px;
}
.TableFormMax {
  height: 460px;
}
.el-select {
  width: 100%;
}
.bock {
  padding: 0px 20px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}
.drawerBtn {
  
  padding-left: 368px !important;
}
</style>
